<div class="form-inline">
    <p>
        <input name="id" id="appendedInputButton" class="span1" type="text" placeholder="Número">&nbsp;
        <input name="data" id="appendedInputButton" class="span2" type="text" placeholder="Data" onfocus="showCalendarControl(this);">
        <input type="submit" name="btnbusca" value="Buscar" class="btn" >
    </p>
</div>

<table class="table table-striped table-bordered table-hover">

    <tr>
        <th width="90">Nº</th>
        <th width="250">Shotter</th>
        <th width="150">Type of MSL</th>
        <th width="80">Shot Time (UTC)</th>
        <th>TGT Range (NM) / TGT Azimuth (Bearing)</th>
        <th width="90">TGT Altitude (K FT)</th>
        <th width="80">MSL TOF (seg)</th>
        <th width="80">Time-out (UTC)</th>
        <th width="70">Kill by system</th>
    </tr>

    <?php
    $sql = "SELECT * FROM shotvalida 
    LEFT JOIN cliente ON cliente.cli_id=shotvalida.cli_id
    LEFT JOIN posto ON posto.pos_id=cliente.pos_id
    LEFT JOIN pais ON pais.pai_id=cliente.pai_id
    WHERE $onde ORDER BY shotvalida.sho_data DESC";
    $res = sql($sql);
    $i=0;
    while($linha = mysql_fetch_array($res)) {
    ?>

    <tr>
        <td><big><strong>SHOT #<?php echo $linha['sho_id'];?></strong></big></td>
        <td>
            <?php 
            echo "<p>{$linha['pai_nome']}</p>";
            echo "<p>{$linha['cli_code']} - {$linha['pos_nome']} {$linha['cli_nome']}</p>"; ?></td>
        <td><?php echo $linha['sho_typemsl'];?></td>
        <td><?php echo $linha['sho_shottime'];?></td>
        <td><?php echo $linha['sho_azimuth'];?></td>
        <td><?php echo $linha['sho_altitude'];?>Ft</td>
        <td><?php echo $linha['sho_msl'];?>s</td>
        <td><?php echo $linha['sho_timeout'];?></td>
        <td><?php if ($linha['sho_kill'] == 1) { echo "Sim"; } else { echo "Não"; }?></td>
    </tr>

    <?
    $i++;
    } 
    ?>
</table>